package com.itheima.charest;

import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

public class CharStreamDemo03 {
    public static void main(String[] args) throws IOException {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入用户名");
        String username=sc.nextLine();
        System.out.println("请输入密码");
        String password=sc.nextLine();
        FileWriter fw=new FileWriter("ChaStream\\a.txt");
        fw.write(username);
        fw.write("\r\n");
        fw.write(password);
        fw.flush();
        fw.close();
    }
}
